package com.fowo.api.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fowo.api.sys.entity.enums.SysDataActivityAction;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

@Data
@Builder
@Schema(title = "系统数据活动")
@TableName(value = "sys_data_activity", autoResultMap = true)
public class SysDataActivity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String dataSource;

    private Long dataId;

    private SysDataActivityAction action;

    private Long userId;

    private String message;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private Object data;

    private Date eventTime;
}
